package com.zm.core.config.runner;

import com.zm.util.Ssh2Pool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * Created by ZM on 2022/2/24 14:56
 */
@Component
public class StartRunner implements ApplicationRunner {
    Logger log= LoggerFactory.getLogger(StartRunner.class);
    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("======项目启动时，初始化Ssh连接池======");
        Ssh2Pool pool= Ssh2Pool.getInstance();
        pool.initPool();
    }
}
